/*
	file:   gentask.c
	author: Anders Ma
	email:  xuejiao.ma@gmail.com
	date:   2010_1114
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <expat.h>


#ifdef _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#endif

#if defined(__amigaos__) && defined(__USE_INLINE__)
#include <proto/expat.h>
#endif

#ifdef XML_LARGE_SIZE
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
#define XML_FMT_INT_MOD "I64"
#else
#define XML_FMT_INT_MOD "ll"
#endif
#else
#define XML_FMT_INT_MOD "l"
#endif


/*
	be careful, don't use any break condition algorithm in PRINT
	just to prevert infinite loop
*/
#ifdef DEBUG_PRINT 
#define PRINT  printf
#else
#define PRINT(...) do {} while (0)
#endif

#define TASK_FILE_NAME "task.xml"
#define MAX_BUFLINE_SIZE 10240

typedef enum _NODE_TYPE {
	METHOD_NODE,
	CLASS_NODE,
	ITEM_NODE,
	UNKNOWN_NODE
} NODE_TYPE;

typedef struct _item_t {
	char *name;
	unsigned int min;
	unsigned int max;
	struct _item_t *next;
} item_t;

typedef struct _class_t {
	char *name;
	struct _item_t *item;
	struct _class_t *next;
} class_t;

